home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / ADA / GNAT / !gcc / adainc / 6 / ads / s-powtab < prev    next >
Text File  |  1996-02-12  |  4KB  |  91 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT COMPILER COMPONENTS                         --
  4. --                                                                          --
  5. --                  S Y S T E M . P O W T E N _ T A B L E                   --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.5 $                              --
  10. --                                                                          --
  11. --     Copyright (C) 1992,1993,1994,1995 Free Software Foundation, Inc.     --
  12. --                                                                          --
  13. -- GNAT is free software;  you can  redistribute it  and/or modify it under --
  14. -- terms of the  GNU General Public License as published  by the Free Soft- --
  15. -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
  16. -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
  17. -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  18. -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
  19. -- for  more details.  You should have  received  a copy of the GNU General --
  20. -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
  21. -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
  22. -- MA 02111-1307, USA.                                                      --
  23. --                                                                          --
  24. -- As a special exception,  if other files  instantiate  generics from this --
  25. -- unit, or you link  this unit with other files  to produce an executable, --
  26. -- this  unit  does not  by itself cause  the resulting  executable  to  be --
  27. -- covered  by the  GNU  General  Public  License.  This exception does not --
  28. -- however invalidate  any other reasons why  the executable file  might be --
  29. -- covered by the  GNU Public License.                                      --
  30. --                                                                          --
  31. -- GNAT was originally developed  by the GNAT team at  New York University. --
  32. -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
  33. --                                                                          --
  34. ------------------------------------------------------------------------------
  35.  
  36. --  This package provides a powers of ten table used for real conversions
  37.  
  38. package System.Powten_Table is
  39. pragma Pure (Powten_Table);
  40.  
  41.    Maxpow : constant := 40;
  42.    --  The number of entries in this table is chosen to be large enough to
  43.    --  correspond to the number of decimal digits in a 128-bit integer. It
  44.    --  seems unlikely that Long_Long_Integer will have more than 128-bits
  45.    --  for some time to come!
  46.  
  47.    Powten : constant array (0 .. 40) of Long_Long_Float :=
  48.       (00 => 1.0E+00,
  49.        01 => 1.0E+01,
  50.        02 => 1.0E+02,
  51.        03 => 1.0E+03,
  52.        04 => 1.0E+04,
  53.        05 => 1.0E+05,
  54.        06 => 1.0E+06,
  55.        07 => 1.0E+07,
  56.        08 => 1.0E+08,
  57.        09 => 1.0E+09,
  58.        10 => 1.0E+10,
  59.        11 => 1.0E+11,
  60.        12 => 1.0E+12,
  61.        13 => 1.0E+13,
  62.        14 => 1.0E+14,
  63.        15 => 1.0E+15,
  64.        16 => 1.0E+16,
  65.        17 => 1.0E+17,
  66.        18 => 1.0E+18,
  67.        19 => 1.0E+19,
  68.        20 => 1.0E+20,
  69.        21 => 1.0E+21,
  70.        22 => 1.0E+22,
  71.        23 => 1.0E+23,
  72.        24 => 1.0E+24,
  73.        25 => 1.0E+25,
  74.        26 => 1.0E+26,
  75.        27 => 1.0E+27,
  76.        28 => 1.0E+28,
  77.        29 => 1.0E+29,
  78.        30 => 1.0E+30,
  79.        31 => 1.0E+31,
  80.        32 => 1.0E+32,
  81.        33 => 1.0E+33,
  82.        34 => 1.0E+34,
  83.        35 => 1.0E+35,
  84.        36 => 1.0E+36,
  85.        37 => 1.0E+37,
  86.        38 => 1.0E+38,
  87.        39 => 1.0E+39,
  88.        40 => 1.0E+40);
  89.  
  90. end System.Powten_Table;
  91.